<template>
  <div>
    <TableVue ref="tableRef" @create="modalVisible = true" :query="query" :table="table" />
    <FormVue @submit="reload" v-model="modalVisible" />
  </div>
</template>

<script setup lang="ts">
import TableVue from "./Table.vue";

import FormVue from "./Form.vue";

const tableRef = ref();
const modalVisible = ref(false);
const query = useQuery<any>();
const table = useTable<any>();

const reload = () => {
  tableRef.value?.search();
};
</script>

<style lang="scss" scoped></style>
